﻿#region << 文件说明 >>

/*----------------------------------------------------------------
 * 命名空间：Vampirewal.Core.Models.FlowEngine
 * 唯一标识：d7844aba-abe3-4a05-8270-071a043376cd
 * 文件名：FlowUserDisp
 *
 * 创建者：杨程
 * 电子邮箱：235160615@qq.com
 * 创建时间：2023/10/13 18:02:21
 * 版本：V1.0.0
 * 描述：
 *
 * ----------------------------------------------------------------
 * 修改人：
 * 时间：
 * 修改说明：
 *
 * 版本：V1.0.1
 *----------------------------------------------------------------*/

#endregion << 文件说明 >>

namespace Vampirewal.Core.Models.FlowEngine;

/// <summary>
/// 用户审核表
/// </summary>
[SugarTable("Work_UserDisp", tableDescription: "用户审核表")]
public class FlowUserDisp : TopModel
{
    /// <summary>
    /// 主键
    /// </summary>
    [SugarColumn(IsPrimaryKey = true, Length = 50)]
    public string DispId { get; set; }

    /// <summary>
    /// 任务表(主表)ID
    /// </summary>
    [SugarColumn(ColumnDescription = "任务表(主表)ID", Length = 50)]
    public string TaskId { get; set; }

    /// <summary>
    /// 当前执行任务的UserID
    /// </summary>
    [SugarColumn(ColumnDescription = "当前执行任务的UserID", Length = 50)]
    public string UserId { get; set; }

    /// <summary>
    /// 当前执行任务的UserName
    /// </summary>
    [SugarColumn(ColumnDescription = "当前执行任务的UserName", Length = 50)]
    public string UserName { get; set; }


    /// <summary>
    /// 处理状态
    /// </summary>
    [SugarColumn(ColumnDescription = "处理状态", Length = 50, IsNullable = true)]
    public WorkStateType State { get; set; }

    /// <summary>
    /// 通知时间
    /// </summary>
    [SugarColumn(ColumnDescription = "通知时间", IsNullable = true)]
    public DateTime? NotifyTime { get; set; }

    /// <summary>
    /// 结束时间
    /// </summary>
    [SugarColumn(ColumnDescription = "结束时间", IsNullable = true)]
    public DateTime? FinishTime { get; set; }

    /// <summary>
    /// 是否通过
    /// </summary>
    [SugarColumn(ColumnDescription = "是否通过", IsNullable = true)]
    public bool? IsPass { get; set; }

    /// <summary>
    /// 审批意见
    /// </summary>
    [SugarColumn(ColumnDescription = "审批意见", IsNullable = true)]
    public string Opinion { get; set; }



    public void SetFinish()
    {
        FinishTime = DateTime.Now;

        this.State = WorkStateType.Finished;

    }
}